package com.game.framework.common;

public enum PoleTypeEnum {
    NO_POLE(0,"无鱼竿"),
    WOOD_POLE(1,"木鱼竿"),
    NOMAL_POLE(2,"普通鱼竿"),
    GOLD_POLE(3,"金鱼竿");

    private final int type;
    private final String desc;

    PoleTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }


    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }


    public static PoleTypeEnum get(Integer type) {
        switch (type) {
            case 1:
                return WOOD_POLE;
            case 2:
                return NOMAL_POLE;
            case 3:
                return GOLD_POLE;
            case 0:
            default:
                return NO_POLE;
        }
    }

    public static String getDesc(Integer type) {
        switch (type) {
            case 1:
                return WOOD_POLE.desc;
            case 2:
                return NOMAL_POLE.desc;
            case 3:
                return GOLD_POLE.desc;
            case 0:
            default:
                return NO_POLE.desc;
        }
    }
}
